<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="WebEventHandler"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
  <DocumentationLinks>
    <xi:include href="BaseEventsDocumentation.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:DocumentationLinks/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
  </DocumentationLinks>
  <xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
  <Caption>Web Event Handler</Caption>
  <Description>Adds a event handler to webs</Description>
  <HostData Priority="30">
    <Icon File="Help/Icons/icon_Events.ico" />
    <CommandBar Menu="SPSFProjectEvents"/>
    <CommandBar Menu="SPSFFolderEvents"/>
    <spsf:MetaData
      Visible="true"
      BindingType="ElementManifestReference"
      BindingTypeTemplate="ElementManifestReferenceTemplate"
      TestType="BaseWebFeatureRecipeRunner"
      Enabled="true"
      CreateVSTemplate="true"
      FeatureScopes="Web;Site"
      Category="Events" xmlns:spsf="http://www.spalmblogger.de">
      <spsf:Authors>
        <spsf:Author>Torsten Mandelkow</spsf:Author>
        <spsf:Author>Matthias Einig</spsf:Author>
      </spsf:Authors>
      <spsf:VersionHistory>
          <spsf:VersionHistoryEntry>1.1 Updated Documentation</spsf:VersionHistoryEntry>
          <spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
      </spsf:VersionHistory>
      <spsf:WebPageContent>
        <![CDATA[Event handlers for sites and webs must be registered with a feature receiver]]>
      </spsf:WebPageContent>
		<spsf:Test>
			<spsf:TestCases>
				<spsf:TestCase Name="Default">
					<spsf:TestCaseArguments>
						<spsf:TestCaseArgument Name="EventHandlerName">WebEvent</spsf:TestCaseArgument>
						<spsf:TestCaseArgument Name="EventHandlerTypes">SiteDeleted;SiteDeleted;SiteDeleted|WebDeleted;WebDeleted;WebDeleted</spsf:TestCaseArgument>
					</spsf:TestCaseArguments>
				</spsf:TestCase>
				<spsf:TestCase Name="WebEventWithScopeSite" Type="SolutionTestCase">
					<spsf:TestCaseArguments>
						<spsf:TestCaseArgument Name="EventHandlerName">WebEventWithScopeSite</spsf:TestCaseArgument>
						<spsf:TestCaseArgument Name="EventHandlerTypes">SiteDeleted;SiteDeleted;SiteDeleted|WebDeleted;WebDeleted;WebDeleted</spsf:TestCaseArgument>
						<spsf:TestCaseArgument Name="EventHandlerScope">Site</spsf:TestCaseArgument>
					</spsf:TestCaseArguments>
				</spsf:TestCase>
				<spsf:TestCase Name="WebEventWithRootWebOnly">
					<spsf:TestCaseArguments>
						<spsf:TestCaseArgument Name="EventHandlerName">WebEventWithRootWebOnly</spsf:TestCaseArgument>
						<spsf:TestCaseArgument Name="EventHandlerTypes">SiteDeleted;SiteDeleted;SiteDeleted|WebDeleted;WebDeleted;WebDeleted</spsf:TestCaseArgument>
						<spsf:TestCaseArgument Name="EventHandlerRootWebOnly">True</spsf:TestCaseArgument>
					</spsf:TestCaseArguments>
				</spsf:TestCase>
			</spsf:TestCases>
		</spsf:Test>
    </spsf:MetaData>
  </HostData>
  <Arguments>

    <Argument Name="EventHandlerTypes" Type="NameValueItemArray" Required="true" >
      <Converter XPath="/RecipeParameters/SPEventReceivers/SPWebEventReceiver" Type="RecipeParametersConverter" />
      <ValueProvider Type="DefaultNameValueCollectionProvider"  />
    </Argument>

	  <Argument Name="TemplatePathFeatureCode" Type="System.String">
		  <ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="Text\Events\WebEventHandler\FeatureReceiverCode.xml.t4"/>
	  </Argument>

    <xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

    <xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    
    <xi:include href="BaseEventsArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

  </Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SharePointSoftwareFactory.Library" />
				<xi:include href="BaseEventsPages.include"  parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/p:Pages/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
			</Pages>
		</Wizard>
	</GatheringServiceData>

	<xi:include href="BaseEventsActions.include" xmlns:xi="http://www.w3.org/2001/XInclude" />
	
</Recipe>


   